package lab12.com.acme.service;

import lab12.com.acme.domain.account.CheckingAccount;
import lab12.com.acme.domain.account.SavingAccount;
import lab12.com.acme.domain.bank.Bank;
import lab12.com.acme.domain.client.Client;
import lab12.com.acme.domain.client.Gender;

import lab12.com.acme.exceptions.NotEnoughFundsException;
import lab12.com.acme.exceptions.OverDraftLimitExceededException;

public class BankApplication
{
	public static final String ALREADY_EX = "This client already exists.";
	private static final String NOT_ENOUGH_FUNDS = "Not enough funds";

	public static void main(String[] args)
	{
		Bank myBank = new Bank(11);
		
		for (int i = 0; i < 10; i++)
		{
			Client newClient;
			if (i % 2 == 0)
			{
				newClient = new Client(Integer.toString(i), Gender.MALE);
				newClient.addAccount(new SavingAccount(i, 100 + i * 10));
			}
			else
			{
				newClient = new Client(Integer.toString(i), Gender.FEMALE);
				newClient.addAccount(new CheckingAccount(i, 100 + i * 10, 100));
			}
			
				myBank.addClient(newClient);
			
		}
		
		//New Client (equals to first client of Bank) and test difference between "==" and equals() method
		myBank.addClient(new Client(Integer.toString(0),Gender.MALE));
		System.out.println(myBank);
		Client[] clients=myBank.getClients();
		if(clients[0]==clients[10]){
			System.out.println("==");
		}
		if(clients[0].equals(clients[10])){
			System.out.println("Eq");
		}
			

	}
		
}
